package cn.pomit.springbootwork.consulconfig.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import cn.pomit.springbootwork.consulconfig.model.ResultModel;
import cn.pomit.springbootwork.consulconfig.service.ConfigInfoService;

@RestController
@RequestMapping("/consulConfig")
public class ConsulConfigRest {
	@Autowired
	ConfigInfoService configInfoService;

	@RequestMapping(value = "/value", method = { RequestMethod.GET })
	public ResultModel value() {
		return ResultModel.ok(configInfoService.testValue());
	}
}
